package componentes;

import java.awt.image.BufferedImage;

import com.uqbar.vainilla.colissions.CollisionDetector;

import comportamiento.ControlesPJ;

public class Llegada extends Componente{

	public Llegada(int x, int y, BufferedImage imagen, ControlesPJ controles, double velocidad){
		
		super(x, y, imagen, controles, velocidad); 
	}
	
	public Boolean hayColisionConLlegada(Personaje p){
		
		return CollisionDetector.INSTANCE.collidesRectAgainstRect
		(this.getX(), this.getY(),
		(int)this.getAppearance().getWidth(), (int)this.getAppearance().getHeight(),
		p.getX(), p.getY(),
		(int)p.getAppearance().getWidth(), (int)p.getAppearance().getHeight());
	}
	
}
